package com.exam.master.model.splash;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.TextUtils;

import com.exam.master.R;
import com.exam.master.WXApplication;
import com.exam.master.model.login.LoginActivity;
import com.exam.master.model.main.view.MainActivity;

public class SplashActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

        if (TextUtils.isEmpty(WXApplication.getInstance().getToken())) {
            LoginActivity.start(this);
        } else {
            MainActivity.start(this);
        }
        finish();
    }
}